define([
        'app',
        './API'
    ],
    function (app) {
        'use strict';

        app.factory('WechatAPI', ['API', '$resource', function (API, $resource) {
            var server = 'http://www.malianghang.cn/wechat-api/config';

            function config(url) {
                return $resource(server).get({url: url}).$promise;
            }

            return {
                config: config
            };
        }]);
    });
